/* © 2020-2025 ALYR.NET */
/* 图片内容审核系统样式文件 */

/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f8f9fa;
    height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow: hidden;
}

/* 容器布局 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-areas: 
        "header"
        "main";
    gap: 20px;
}

/* 头部样式 */
.header {
    grid-area: header;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: #000;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    background: #e74c3c;
    transition: background-color 0.2s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

.logout-btn:active {
    background: #a93226;
}

.header-text {
    flex: 1;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.header p {
    font-size: 16px;
    color: #7f8c8d;
}

.open-new-window-btn {
    display: none; /* 隐藏无法截图上传按钮 */
}

/* 功能列表样式 */
.features-list {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow: visible;
    padding: 5px;
    position: relative;
}

.feature-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    flex: 0 0 auto;
    white-space: nowrap;
    position: relative;
    cursor: pointer;
}

.feature-item:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.feature-title {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    display: inline;
}

.feature-desc {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    width: 280px;
    max-width: 90vw;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin-top: 5px;
}

.feature-item:hover .feature-desc {
    display: block;
}

.feature-desc::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #2c3e50;
}

/* 主内容区域 */
.main-content {
    grid-area: main;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.main-content.has-files {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.main-content.has-files .upload-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-section {
    display: flex;
    flex-direction: column;
}

.results-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 上传区域样式 */
.upload-area {
    background: #fff;
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: calc(100vh - 200px);
}

.main-content.has-files .upload-area {
    display: none;
}

.main-content.has-files .upload-area .upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.main-content.has-files .upload-area .upload-text {
    font-size: 14px;
    margin-bottom: 8px;
}

.main-content.has-files .upload-area .upload-hint {
    font-size: 12px;
    margin-bottom: 6px;
}

.main-content.has-files .upload-area .upload-limit {
    font-size: 13px;
    padding: 6px 12px;
}

.upload-area:hover {
    border-color: #2980b9;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #27ae60;
    background: #e8f5e8;
    transform: scale(1.02);
}

.upload-area.active {
    border-color: #e74c3c;
    background: #fff5f5;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: #3498db;
}

.upload-text {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
}

.upload-hint {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 8px;
}

.upload-limit {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 500;
    background: rgba(231, 76, 60, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.file-input {
    display: none;
}

/* 批量上传区域 */
.batch-upload {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.batch-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* 按钮样式 */
.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #2980b9;
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 文件列表样式 */
.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    width: 100%;
}

.file-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    position: relative;
    width: 100%;
    min-width: 140px;
}

.file-preview {
    width: 100%;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 6px;
    background: #f8f9fa;
}

.file-name {
    font-size: 12px;
    color: #2c3e50;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.file-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* 状态样式 */
.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-analyzing {
    background: #cce5ff;
    color: #004085;
}

.status-safe {
    background: #d4edda;
    color: #155724;
}

.status-unsafe {
    background: #f8d7da;
    color: #721c24;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-logo-detected {
    background: #d5f4e6;
    color: #27ae60;
}

.status-no-logo {
    background: #fdeaea;
    color: #e74c3c;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 结果区域样式 */
.results-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #7f8c8d;
    height: 100%;
    overflow: hidden;
}

.results-section:has(.results-placeholder) {
    overflow: hidden;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.placeholder-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #34495e;
}

.placeholder-hint {
    font-size: 14px;
    opacity: 0.7;
}

.results-header {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: stretch;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 结果信息头部 */

.result-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-all;
    border: 1px solid #e9ecef;
    padding-left: 10px;
    border-radius: 10px;
}

.result-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.status-icon {
    font-size: 16px;
}

.status-text {
    font-size: 14px;
}

/* 置信度信息 */
.confidence-info {
    margin-top: 8px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
}

.confidence-label {
    color: #666;
    margin-right: 6px;
}

.confidence-value {
    font-weight: 600;
    color: #2c3e50;
}



.result-image-container {
    position: relative;
    width: 150px;
    height: 100%;
    flex-shrink: 0;
}

.result-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #f8f9fa;
}

.detail-icon {
    margin-right: 8px;
    font-size: 16px;
    font-weight: bold;
}

.result-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.result-info {
    display: flex;
    flex-direction: column;
}

.result-details {
    margin-top: 15px;
}

.result-details h5 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 6px;
}

.detection-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.info-item {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 500;
    color: #666;
    min-width: 50px;
    font-size: 13px;
}

.info-value {
    flex: 1;
    font-size: 13px;
    display: flex;
    align-items: center;
    color: #333;
    margin-top: -3px;
}



/* LOGO识别样式 */
.logo-details {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 12px;
    margin-top: 0;
}

.logo-no-result {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 4px;
    padding: 12px;
    margin-top: 0;
    text-align: center;
}

.no-logo-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.no-logo-text {
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
}

.no-logo-hint {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.logo-brand {
    font-weight: 600;
    color: #3498db;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
}

.logo-confidence {
    color: #27ae60;
    margin-bottom: 10px;
    font-size: 14px;
}

.logo-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.logo-btn {
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.logo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 置信度样式 */
.confidence-section {
    margin-top: 12px;
}

.confidence-text {
    font-size: 15px;
    color: #666;

    font-weight: 500;
}

.confidence-text-bar {
    display: flex;
    align-items: center;
    gap: 5px;
}

.confidence-bar {
    flex: 1;
    min-width: 80px;
}

.confidence-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.confidence-safe {
    background: #27ae60;
}

.confidence-warning {
    background: #f39c12;
}

.confidence-unsafe {
    background: #e74c3c;
}

.confidence-red {
    color: #e74c3c;
}

/* 加载样式 */
.loading {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    flex-shrink: 0;
    color: #7f8c8d;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 统计样式 */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.modal-message {
    font-size: 16px;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-section {
        grid-template-columns: 1fr;
    }
    
    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .result-card {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .open-new-window-btn {
        position: static;
        align-self: center;
    }
}

.logo-details .detail-icon {
  color: #3498db !important;
}